<?php	
if(!isset($_SESSION)) session_start();

	/* import */
include_once('../DAO/TurmaDAO.php');
include_once('../DAO/ProfessorDAO.php');
	/* */
class TurmaPresenter{
		// construtor
         public function __construct(){
         }
         

        public function __cadastroSimples($pProfessor_matricula, $pcodDisciplina,$nome,$descricao){
         
        $turmaDAO = new TurmaDAO();
        $turmaDAO->__initialize();
              try{
                   
                    $retorno = $turmaDAO->__cadastroTurmaSimples($pProfessor_matricula, $pcodDisciplina,$nome,$descricao);	
              }catch(Exception $e){
                   $retorno = NULL;
              }
             $turmaDAO->__finalize();
              
              return $retorno;	
        }
        
           public function __alunosTurmas($id, $iddisciplina,$professor, $aluno){
        
        $turmaDAO = new TurmaDAO();
        $turmaDAO->__initialize();
              try{
                    $turmaDAO->__cadastroAlunoTurmaSimples($id, $iddisciplina,$professor, $aluno);	
                    $retorno = TRUE;
              }catch(Exception $e){
                   $retorno = FALSE;
              }
             $turmaDAO->__finalize();
              
              return $retorno;	
        }
        
       
        public function __logout(){
            if(!isset($_SESSION)) {
            session_start();
        }
        session_destroy();		
           }
           
        public function  __redi(){
  
                        header("Location: ..\EstruturaPagina\cadastroTurma.php");
         
        }
}	
?>